import React from 'react'
import { createBrowserRouter } from "react-router-dom";
import { ErrorPage } from '../pages/error.page';
import { NotFoundPage } from '../pages/404.page';
import { MainPage } from '../pages/main.page';
import { LoginPage } from '../pages/login.page';
import { MoneyPage } from '../pages/money.page';
import { MinePage } from '../pages/mine.page';
import { SettingPage } from '../pages/setting.page';
import { DevPage } from '../pages/dev.page';
import { SmsPage } from '../pages/sms.page';
import { KwaiPage } from '../pages/kwai.page';
import { RegisterPage } from '../pages/register.page';
import { MineDevicePage } from '../pages/mine-device.page';
import { MineMoneyPage } from '../pages/mine-money.page';
import { MineSettingPage } from '../pages/mine-setting';

export const router = createBrowserRouter([
    {
        path: "/autojs/core/mobile/",
        element: <MainPage />,
        errorElement: <ErrorPage />,
        children: [
            {
                path: "index",
                element: <MoneyPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "sms",
                element: <SmsPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "dev",
                element: <DevPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "kwai",
                element: <KwaiPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "money",
                element: <MoneyPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "setting",
                element: <SettingPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "mine",
                element: <MinePage />,
                errorElement: <ErrorPage />
            },
            {
                path: "mine-device",
                element: <MineDevicePage />,
                errorElement: <ErrorPage />
            },
            {
                path: "mine-money",
                element: <MineMoneyPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "mine-setting",
                element: <MineSettingPage />,
                errorElement: <ErrorPage />
            },
            {
                path: "login",
                element: <LoginPage />,
                errorElement: <ErrorPage />
            },
            {
                path: 'register',
                element: <RegisterPage/>,
                errorElement: <ErrorPage/>
            }
        ]
    },
    {
        path: '*',
        element: <NotFoundPage />
    }
]);
